package edu.webtek.cloudreq;

import org.jdom2.output.XMLOutputter;
import org.jdom2.Document;
import org.jdom2.Element;

public class ReqLogin extends ReqBase{
	private final String customerName;
	private final String customerPass;
	
	public ReqLogin(String customerName, String customerPass) {
		super();
		this.customerName = customerName;
		this.customerPass = customerPass;
	}
	@Override
	public Document toDocument() {
		Element customerName = createElement("customerName", this.customerName);	
		Element customerPass = createElement("customerPass", this.customerPass);
		Element login 		 = createElement("login", customerName, customerPass);
		Document out = new Document(login);
		XMLOutputter xout = new XMLOutputter();
		System.out.print(xout.outputString(out));
		
		return out;
	}
}
